package com.template.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.alibaba.excel.enums.poi.FillPatternTypeEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;

import java.io.Serializable;
import java.time.LocalDateTime;

@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
public class User implements Serializable {
    @HeadStyle(fillForegroundColor = 13)
    @ExcelProperty(value="id")
//    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    @ExcelProperty(value="姓名")
    @HeadStyle(fillForegroundColor = 13)
    private String name;
    @ExcelProperty(value="账号")
    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 13)
    private String account;
    @ExcelProperty(value="密码")
    @HeadStyle(fillForegroundColor = 13)
    private String password;
    @ExcelProperty(value="图片地址")
    @HeadStyle(fillForegroundColor = 13)
    private String imageUrl;
    @ExcelProperty(value="创建时间")
    @HeadStyle(fillForegroundColor = 13)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",shape = JsonFormat.Shape.STRING)
//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime createTime;
//    @ExcelProperty(value="性别",converter = GenderConverter.class)
    @HeadStyle(fillForegroundColor = 13)
    private Integer sex;
    @ExcelProperty(value="联系电话")
    @HeadStyle(fillForegroundColor = 13)
    private String phone;
//    @ExcelProperty(value="身份权限",converter = StateConverter.class)
    @HeadStyle(fillForegroundColor = 13)
    private Integer state;//权限

//    @HeadStyle(fillForegroundColor = 13)
    private String captcha;//验证码
}
